package com.zhang.exceltest.modules.sys.controller;


import com.zhang.exceltest.modules.common.specification.EntitySpecification;
import com.zhang.exceltest.modules.sys.dao.SysUserRepository;
import com.zhang.exceltest.modules.sys.entity.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;


@RestController
public class SysUserController {


    @Autowired
    SysUserRepository userRepository;


    @RequestMapping("/EntitySpec")
    public ResponseEntity test(SysUser user, HttpServletRequest request){
        Map<String, String[]> parameterMap = request.getParameterMap();
        EntitySpecification<SysUser> spec = new EntitySpecification<SysUser>(user,parameterMap);
        PageRequest page = PageRequest.of(1, 2);
        return ResponseEntity.ok("请求成功");
    }
}
